path
( service in module ng
)
This method is getter / setter.
Return path of current url when called without any parameter.
Change path when called with parameter and return $location
.
Note: Path should always begin with forward slash (/), this method will add the forward slash if it is missing.
path(optional) – {string=} –
New path
{string}
– path